﻿@{
    ViewBag.Title = "MinhasTarefas";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@functions{

string Cor(int tipo){
 
    switch(tipo){
        case 4:
            return "success";   
        case 2:
            return "error";
        case 3:
            return "info";
        default:
            return "warning";
    }
}    
    

}

@section styles{
    <style type="text/css">
        body {
            padding-top: 60px;
            padding-bottom: 40px;
        }
    </style>
}

@{ Html.RenderPartial("_Menu"); }

<div class="container">


    <h2>Minhas Tarefas Pendentes</h2>


    <table class="table table-bordered table-hover">
        <thead>
            <tr>
                <th>Quadro</th>
                <th>Tarefa</th>
                <th>Status</th>
            </tr>
        </thead>
        <tbody>
            @foreach (Kanban.Entity.Tarefa tarefa in Model)
            {
                <tr class="@Cor(tarefa.Tipo)">
                    <td><a href="@Url.Action("Quadro", new { id = tarefa.Quadro.Id })">@tarefa.Quadro.Nome</a> </td>
                    <td>@tarefa.Descricao</td>
                    <td>@tarefa.DescricaoStatus</td>
                </tr>
            }
        </tbody>
    </table>

</div>